package com.boyunv.chainduty.example02;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/22 22:37
 *@version 1.0
 */

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.SimpleFormatter;

public class Client {
    public static void main(String[] args) throws ParseException {
        AuthController controller = new AuthController();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date parse = format.parse("2022-11-12 00:00:20");
        //模拟审核请求和操作
        AuthInfo info = controller.doAuth("研发小赵", "1000000022320", parse);
        System.out.println("当前的审核状态:"+info.getInfo());
        
        AuthService.auth("100013","1000000022320");
        System.out.println("三级审批负责人审批完成,审批人:小赵 ");
        System.out.println("=====================================");
        AuthInfo info2 = controller.doAuth("研发小赵", "1000000022320", parse);
        System.out.println("当前的审核状态:"+info2.getInfo());
        
        AuthService.auth("100012","1000000022320");
        System.out.println("2级审批负责人审批完成,审批人:赵 ");
        
        System.out.println("=====================================");
        AuthInfo info3 = controller.doAuth("研发小赵", "1000000022320", parse);
        System.out.println("当前的审核状态:"+info2.getInfo());
        
        AuthService.auth("100011","1000000022320");
        System.out.println("1级审批负责人审批完成,审批人:赵硕 ");
    }
}
